package com.junjie.blibli.Sample.util;

import com.junjie.blibli.util.TokenUtil;
import org.apache.ibatis.logging.stdout.StdOutImpl;

public class TokenTest {
    public static void main(String[] args) throws Exception {
        String token = TokenUtil.generateToken(1L);
        System.out.println(token);
        Long userId = TokenUtil.verifyToken(token);
        System.out.println(userId);
        String test = "eyJraWQiOiJudWxsIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiLkv4rmnbAiLCJleHAiOjE2NzYwNDQ4MTd9.JH-Y8BmCf_yRI971xKoq1Tjs4gx77Nq7W_0PODv-ShgIcrgKEl7KleLr66k7inqfvObYiWDAFL_t460Th-C1LP_KxnQy0z_UrFae17vwrZ59w5yrJkfw71_vbpdDD3bTGjyW_j-0ghx3UVOxW7onL7j-h3StxPP8OvRztGZzJJQ";
        Long userId2 = TokenUtil.verifyToken(test);
        System.out.println(userId2);
    }
}
